﻿<%@ Page Language="C#" MasterPageFile="~/Home/ad/admin.master" AutoEventWireup="true" CodeFile="ad_tk_tt.aspx.cs" Inherits="Home_ad_ad_tk_tt" Title="Welcome to administrator" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table cellpadding="0" cellspacing="0">
        <caption>
            Thông tin về tài khoản</caption>
        <tr>
            <td>
            </td>
            <td style="width: 623px">
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td style="width: 623px">
                &nbsp;<asp:SqlDataSource ID="sql_taikhoan" runat="server" ConnectionString="<%$ ConnectionStrings:db_connection %>"
                    SelectCommand="SELECT [ID], [TenDangNhap], [TinhTrang], [CMND], [DiaChi], [Email], [HoTen] FROM [KH001] WHERE ([TinhTrang] <> @TinhTrang) ORDER BY [ID]" DeleteCommand="DELETE FROM [KH001] WHERE [ID] = @ID" InsertCommand="INSERT INTO [KH001] ([TenDangNhap], [TinhTrang], [CMND], [DiaChi], [Email], [HoTen]) VALUES (@TenDangNhap, @TinhTrang, @CMND, @DiaChi, @Email, @HoTen)" UpdateCommand="UPDATE [KH001] SET [TenDangNhap] = @TenDangNhap, [TinhTrang] = @TinhTrang, [CMND] = @CMND, [DiaChi] = @DiaChi, [Email] = @Email, [HoTen] = @HoTen WHERE [ID] = @ID">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="a" Name="TinhTrang" Type="String" />
                    </SelectParameters>
                    <DeleteParameters>
                        <asp:Parameter Name="ID" Type="Int32" />
                    </DeleteParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="TenDangNhap" Type="String" />
                        <asp:Parameter Name="TinhTrang" Type="String" />
                        <asp:Parameter Name="CMND" Type="String" />
                        <asp:Parameter Name="DiaChi" Type="String" />
                        <asp:Parameter Name="Email" Type="String" />
                        <asp:Parameter Name="HoTen" Type="String" />
                        <asp:Parameter Name="ID" Type="Int32" />
                    </UpdateParameters>
                    <InsertParameters>
                        <asp:Parameter Name="TenDangNhap" Type="String" />
                        <asp:Parameter Name="TinhTrang" Type="String" />
                        <asp:Parameter Name="CMND" Type="String" />
                        <asp:Parameter Name="DiaChi" Type="String" />
                        <asp:Parameter Name="Email" Type="String" />
                        <asp:Parameter Name="HoTen" Type="String" />
                    </InsertParameters>
                </asp:SqlDataSource>
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
                    AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="sql_taikhoan" Width="618px">
                    <Columns>
                        <asp:BoundField DataField="ID" HeaderText="M&#227;" InsertVisible="False" ReadOnly="True"
                            SortExpression="ID">
                            <ControlStyle Width="15px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="TenDangNhap" HeaderText="T&#234;n đăng nhập" SortExpression="TenDangNhap">
                            <ControlStyle Width="50px" />
                            <ItemStyle Width="50px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="TinhTrang" HeaderText="T&#236;nh trạng" SortExpression="TinhTrang">
                            <ControlStyle Width="15px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="CMND" HeaderText="CMND" SortExpression="CMND">
                            <ControlStyle Width="35px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="DiaChi" HeaderText="Địa chỉ" SortExpression="DiaChi">
                            <ControlStyle Width="60px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email">
                            <ControlStyle Width="80px" />
                            <FooterStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="HoTen" HeaderText="Họ t&#234;n" SortExpression="HoTen">
                            <ControlStyle Width="50px" />
                        </asp:BoundField>
                        <asp:CommandField ButtonType="Button" CancelText="[hủy bỏ]" EditText="[sửa]" ShowEditButton="True"
                            UpdateText="[Cập nhật]" />
                        <asp:CommandField ButtonType="Button" DeleteText="[X&#243;a]" ShowDeleteButton="True" />
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td style="height: 19px">
            </td>
            <td style="width: 623px; height: 19px">
            </td>
        </tr>
    </table>
   

</asp:Content>

